<extend name="Base/common"/>

<block name="right">
    <script type="text/javascript">
        $(document).ready(function () {

			
          $("#changselect").bind("change",function(){
            if($(this).val()==0){

                $("#B_number").css("display","inline");
                $("#B_number1").css("display","none");
                $("#form-control").css("display","none");
                $("#B_number1").val("");
                $("#form-control").val("");

            }else if($(this).val()==1){

                $("#B_number").css("display","none");
                $("#B_number1").css("display","inline");
                $("#form-control").css("display","none");
                $("#B_number").val("");
                $("#form-control").val("");

            }else if($(this).val()==2){

                $("#B_number").css("display","none");
                $("#B_number1").css("display","none");
                $("#form-control").css("display","inline");
                $("#form-control").val("");
                $("#B_number").val("");
            }
          });
        });
    </script>
	<style>
.cover2 {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15);
    position: fixed;
    z-index: 1001;
    display: none;
}
.alert {
    width: 530px;
    height: 330px;
    background: #fff;
    box-shadow: 2px 2px 3px #c5c7c8;
    position: absolute;
    left: 50%;
    top: 50%;
    margin-top: -165px;
    margin-left: -265px;
    padding: 0;
}
.close-con {
    width: 100%;
    height: 38px;
}
.close {
    width: 30px;
    height: 10px;
    background: url("../images/close.png") no-repeat;
    margin-right: 10px;
    margin-top: 10px;
	font-size:12px;
}
.right {
    float: right;
}
.alert-span {
    padding: 40px 34px;
    font-size: 14px;
    color: #333;
    text-align: center;
}.btn-con {
    width: 100%;
    height: 68px;
	text-align: center;
  padding: 0px 34px;
}
.mg-left70 {
    margin-left: 70px;
}
.yes {
    width: 100px;
    background: #40bcb0;
}
.btn {
    width:225px;
    height: 35px;
	line-height:25px;
    background: #808aa4;
    font-size: 14px;
    color: #fff;
}
.btn:hover,.btn:focus{
  color: #fff;
}
</style>
<script>
$(document).ready(function(){
	$('.sub_baogao').click(function(){
		var qurenid = $( this ).attr('qurenid');
		$('.queren_id').val(qurenid);
		$('.cover2').show();
	})

	$('.guanbi_close').click(function(){
		$('.cover2').hide();
	})

	$('.baocun_yes').click(function(){
		var queren_id = $('.queren_id').val();
		var process_id = 10;
		var qryy = $('.yunyin').val();
		$.post('{:U("Home/Task/set_queren")}',{'id':queren_id,'process_id':process_id,'qryy':qryy},function(data){
			if( data.code == 1 )
			{
				alert('确认成功');
				location.reload();
			}
			else
			{
				alert('确认失败');
			}
		},'json')
		return false;
	})
})
</script>
	<div class="cover2">
		<div class="alert br4">
			<div class="close-con clearfix">
				<div class="close right guanbi_close">关闭</div>
			</div>
			<div class="alert-span"><textarea style="width:65%;height:110px;resize:none;" type="text" class="yunyin" placeholder='请核对查新报告' cols="30" rows="4"></textarea><input type="hidden" value="" class="queren_id"></div>
			<div class="btn-con">
				<div class="btn yes baocun_yes">确定</div>
			</div>
		</div>
	</div>
    <div class="main-container">
        <div class="padding-md">
            <div class="row">
                <div class="col-sm-12">
                    <div class="page-title">
                         我的委托
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-lg-12">
                    <div class="smart-widget widget-green">
                        <div class="smart-widget-header row ">
                            <span class="smart-widget-option">
                                <span class="refresh-icon-animated">
                                    <!--<i class="fa fa-spinner fa-spin" style="color:#fff"></i>-->
                                </span>
                                <a href="#" class="widget-toggle-hidden-option">
                                    <!--<i class="fa fa-cog"></i>-->
                                </a>
                                <a href="#" class="widget-collapse-option" data-toggle="collapse">
                                    <!--<i class="fa fa-chevron-up"></i>-->
                                </a>
                                <a href="#" class="widget-refresh-option">
                                    <!--<i class="fa fa-refresh"></i>-->
                                </a>
                            </span>
                        </div>
                        <div class="smart-widget-inner table-responsive">
                            <table class="table table-striped no-margin">
                                <thead>
                                    <tr>
                                        <th style="width: 65px">序号</th>
                                        <th style="min-width: 300px;">项目名称</th>
                                        <th style="width: 100px">查新号</th>
                                        <th style="width: 180px">处理机构</th>
                                        <th style="width: 120px">处理状态</th>
                                        <th style="width: 100px">报告状态</th>
										<th style="width: 100px">费用</th>
                                        <th style="width: 100px">委托日期</th>
                                        <th style="width: 100px">查新报告</th>
                                        <th style="width: 200px">操作</th>
                                    </tr>
                                </thead>
                                <tbody class="cy_takeyouflytb">
                                    <empty name="_list">
                                        <tr>
                                            <td colspan="8">对不起暂时没有数据！</td>
                                        </tr>
                                        <else/>
                                        <volist name="_list" id="vo" key="k">
                                            <tr>
                                                <td style="width: 60px">{$num+$k}</td>
                                                <td style="text-align: left;">
                                                    <a title="查看" style="color: blue !important;width: 300px;overflow: hidden;display: inline-block;white-space: nowrap;text-overflow: ellipsis;" href="{:U('Task/browser',array('id'=>$vo['id'],'tag'=>1))}" >{$vo.xmmc}</a>
                                                </td>
                                                <td>{$vo.cxh}</td>
                                                <td>
                                                        {$vo.department_id|getAgencynameById}
                                                </td>
                                                <td>{$vo.process_id|getTitleByProcessId=$vo[department_id]}</td>
                                                <td style="width: 140px">
                                                    <if condition="$vo.process_id eq -2">
                                                        <font color="red"></font>
                                                        <elseif condition="($vo.process_id eq 13) OR ($vo.process_id eq 16) OR ($vo.process_id eq 11) OR ($vo.process_id eq 0) OR ($vo.process_id eq 17) OR ($vo.process_id eq 20)"/>
                                                        剩余<font color="blue">{$vo.date}</font>天
                                                        <elseif condition="$vo.process_id eq 14"/>
                                                        <font color="red">可取报告</font>
                                                    </if>

                                                </td>
												<td>{$vo.zfy}</td>
                                                <td><span href="javascript:void(0);" title="{$vo.intime}">{$vo['intime']|substr=0,-8}</span></td>
                                                <td>
                                                    <if condition="$vo['cx_file_ids']">
                                                        <?php $vo['fileId']=explode(',',$vo['cx_file_ids']);?>
														
                                                        <foreach name="vo.fileId" item="file" key="k">
                                                            <a href="{:U('Task/down_file',array('file_id'=>$file))}"><img src="__IMG__/unit/baogao.png" width='17px;' hright="17px;"></a>&nbsp;
                                                        </foreach>
                                                    </if>
                                                </td>
                                                <td>
                                                    <!--<a href="{:U('Task/browser',array('id'=>$vo['id']))}">查看</a>-->
                                                    <if condition="$vo['process_id'] eq -2 || $vo['process_id'] eq 20">
                                                        <a href="./edit.html?id={$vo['id']}" title="编辑">
                                                            <img src="__PUBLIC__/Home/images/edit.png">
                                                        </a>
                                                        <a href="{:U('Task/stop_task',array('id'=>$vo['id']))}" class="ajax-get confirm" title="撤销">
                                                            <img src="__PUBLIC__/Home/images/chexiao.png">
                                                        </a>
                                                    </if>
													<if condition="$vo['process_id'] eq 17">
                                                        <a href="./edit.html?id={$vo['id']}" title="编辑">
                                                            <img src="__PUBLIC__/Home/images/edit.png">
                                                        </a>
                                                    </if>
                                                    <if condition="$vo['process_id'] eq -1 ">
                                                        <a href="{:U('Task/tj_task_again',array('id'=>$vo['id']))}" class="ajax-get confirm" title="重新申请">
                                                            <img src="__PUBLIC__/Home/images/chong.png">
                                                        </a>
                                                        <a href="{:U('Task/edit',array('id'=>$vo['id']))}" title="编辑">
                                                            <img src="__PUBLIC__/Home/images/edit.png">
                                                        </a>
                                                    </if>
                                                    <if condition="$vo['process_id'] eq 15 ">
                                                        <a href="{:U('Task/tj_task_again2',array('id'=>$vo['id']))}"class="ajax-get confirm" title="重新申请">
                                                            <img src="__PUBLIC__/Home/images/chong.png">
                                                        </a>
                                                        <a href="{:U('Task/edit',array('id'=>$vo['id']))}" title="编辑">
                                                            <img src="__PUBLIC__/Home/images/edit.png">
                                                        </a>
                                                    </if>
                                                    <a href="{:U('Task/p_track',array('id'=>$vo['id']))}" target='_blank' title="追踪">
                                                        <img src="__PUBLIC__/Home/images/zhuizong.png">
                                                    </a>
													<?php if($vo['process_id']== 40)  {?>
														<a href="javascript:;" class="sub_baogao" title="确认查新报告" qurenid="<?=$vo['id']?>">确认</a>
													<?php
													}
													?>
                                                </td>
                                            </tr>
                                        </volist>
                                    </empty>
                                </tbody>
                            </table>
                            <div class="choose-page row">
                                {$_page}
                            </div>
                        </div><!-- ./smart-widget-inner -->
                    </div><!-- ./smart-widget -->
                </div><!-- ./col -->
            </div><!-- ./row -->
        </div><!-- ./padding-md -->
    </div><!-- /main-container -->
</block>

<block name="script">
    <script type="text/javascript" src="__STATIC__/My97DatePicker/WdatePicker.js"></script>
    <script>
        $(document).ready(function () {
            highlight_nav2('{:U('Task/index')}');
        });

    </script>
</block>
